package rexsee.core.widget;

import rexsee.core.menu.PopMenu;
import android.content.Context;
import android.graphics.Color;
import android.widget.LinearLayout;

public class TabButtonRow extends Div {

	public TabButtonRow(final Context context, PopMenu popMenu) {
		super(context);
		setDivId(popMenu.id);
		styleSheet = popMenu.styleSheet.clone();
		setDivStyle();
		LinearLayout layout = new LinearLayout(context);
		layout.setOrientation(LinearLayout.HORIZONTAL);
		layout.setGravity(styleSheet.getGravity());
		layout.setBackgroundColor(Color.TRANSPARENT);
		for (int i = 0; i < popMenu.items.size(); i++) {
			final TabButton button = new TabButton(context, popMenu.items.get(i));
			layout.addView(button);
		}
		this.addChild(layout);
	}

}
